package work727;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public abstract class Worker{
  private  int id;
  private  String name;
  private  String sex;
  private  int age;
  private  String rank;//职称
  private  String education; //学历
  private  String department;//部门
  private  Date date;
  private  int basewage;//基本工资
  private  double salary;


  public Worker() {
  }

  public Worker(int id, String name, String sex, int age, String rank, String education, String department, Date date) {
    this.id = id;
    this.name = name;
    this.sex = sex;
    this.age = age;
    this.rank = rank;
    this.education = education;
    this.department = department;
    this.date = date;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getSex() {
    return sex;
  }

  public void setSex(String sex) {
    this.sex = sex;
  }

  public int getAge() {
    return age;
  }

  public void setAge(int age) {
    this.age = age;
  }

  public String getRank() {
    return rank;
  }

  public void setRank(String rank) {
    this.rank = rank;
  }

  public String getEducation() {
    return education;
  }

  public void setEducation(String education) {
    this.education = education;
  }

  public String getDepartment() {
    return department;
  }

  public void setDepartment(String department) {
    this.department = department;
  }

  public Date getDate() {
    return date;
  }

    public void setDate(Date date) {

    this.date = date;
  }

  public int getBasewage() {
    if (getRank().equals("高级")){
      return 5000;
    }else  if (getRank().equals("中级")){
      return 4000;
    }else{
      return 3000;
    }
  }

  public double getSalary() {
    return salary;
  }

  public void setSalary(double salary) {
    this.salary = salary;
  }
}

